/**
 * There are code generation
 */
package com.neusoft.lohas.modules.ivm.entity.merchant;

import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;

import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.annotations.NotFound;
import org.hibernate.annotations.NotFoundAction;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.neusoft.lohas.common.persistence.IdEntity;

/**
 * 服务条款Entity
 * @author Jackie.Liu
 * @version 2014-10-30
 */
@Entity
@Table(name = "ivm_merchant_clause")
@DynamicInsert @DynamicUpdate
public class MerchantClause extends IdEntity<MerchantClause> {

	private static final long serialVersionUID = 1L;
	private String content; 	// 内容
	private Merchant merchant; //商户信息
	private String lhNo;	//乐活号
	private String wxNo;	//微信号
	private String phone;	//客服电话

	public MerchantClause() {
		super();
	}

	public MerchantClause(String id){
		this();
		this.id = id;
	}
	
	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}
	
	@ManyToOne
	@JoinColumn(name="merchant_id")
	@NotFound(action = NotFoundAction.IGNORE)
	@JsonIgnore
	@NotNull(message="所属商户信息不能为空")
	public Merchant getMerchant() {
		return merchant;
	}

	public void setMerchant(Merchant merchant) {
		this.merchant = merchant;
	}

	public String getLhNo() {
		return lhNo;
	}

	public void setLhNo(String lhNo) {
		this.lhNo = lhNo;
	}

	public String getWxNo() {
		return wxNo;
	}

	public void setWxNo(String wxNo) {
		this.wxNo = wxNo;
	}

	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

}


